package cn.jesin.ssmss01.vo.responseformat;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @author 谷汉斌
 * @description 操作码
 * @createTime 2024/7/22 下午2:28
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum Code {
    /**
     * code 响应码
     * info 响应信息
     */
    DENIED(-1, "权限不足"),
    GRANTED(101, "权限已获得"),
    ADD_FAIL(-2, "添加失败"),
    ADD_SUCCESS(102, "添加成功"),
    DELETE_FAIL(-3, "删除失败"),
    DELETE_SUCCESS(103, "删除成功"),
    QUERY_FAIL(-4, "查询失败"),
    QUERY_SUCCESS(104, "查询成功"),
    UPDATE_FAIL(-5, "更新失败"),
    UPDATE_SUCCESS(105, "更新成功"),
    REGISTER_FAIL(-11, "注册失败!"),
    REGISTER_SUCCESS(111, "注册成功!"),
    LOGIN_FAIL(-12, "登录失败!"),
    LOGIN_SUCCESS(112, "登录成功!"),
    BIND_FAIL(-13, "绑定失败!"),
    BIND_SUCCESS(113, "绑定成功!"),
    CODE_SEND_FAIL(-14, "验证码发送失败!"),
    CODE_SEND_SUCCESS(114, "验证码发送成功!"),
    SERVER_ERROR(-999, "服务器正在升级，请稍后再试！");
    private Integer code;
    private String info;
}
